package com.itheima.ssm.service;

import com.itheima.ssm.domain.Permission;
import com.itheima.ssm.domain.Role;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

//角色管理
public interface IRoleService {
    List<Role> findAll() throws Exception;

    void save(Role role) throws Exception;

    Role findById(String roleId) throws Exception;

    void delRoleById(String roleId) throws Exception;

    //根据roleId查询出该角色没有的所有权限[查询]
    List<Permission> findRoleByIdAndAllPermission(String roleId) throws Exception;

    //根据roleId查询出该角色没有的所有权限[添加]
    void addPermissionToRole(String roleId, String[] permissions) throws Exception;
}
